package com.piece.blog.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 题目选项 training_question_item
 *
 * @author onepiece
 * @date 2023-09-12
 */
@Data
@NoArgsConstructor
@Entity
@Table(name = "training_question_item")
@ApiModel(value = "题目选项")
public class TrainingQuestionItem implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "item_id", length = 11)
    @ApiModelProperty(value = "选项ID")
    private Long itemId;

    @Column(name = "question_id")
    @ApiModelProperty(value = "题目标签")
    private Long questionId;

    @Column(name = "type")
    @ApiModelProperty(value = "选项类型: 0：文字、1：图片、2：音频")
    private String type;

    @Column(name = "label")
    @ApiModelProperty(value = "选项内容：选择性题目为选项、填空题/客观题为NULL")
    private String label;

    @Column(name = "value")
    @ApiModelProperty(value = "选项值")
    private String value;

    @Column(name = "create_by")
    @ApiModelProperty(value = "创建人ID")
    private Long createBy;

    @Column(name = "create_time")
    @ApiModelProperty(value = "创建时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

}
